//
//  CoGeMissingsSearchController.h
//  CoGeOpenSource
//
//  Created by Tamas Nagy on 5/10/11.
//  Copyright 2011 home. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CoGeThreadSafeMutableArray.h"

@interface CoGeMissingsSearchController : NSObject <NSTableViewDelegate, NSTableViewDataSource> {

    NSWindow *window;
    NSTableView *theTableView;
    NSProgressIndicator *progressIndicator;
    NSTextField *currentLabel;
    NSDictionary *missingsDict;
    NSMutableDictionary *origDict;
    
    CoGeThreadSafeMutableArray *searchScopes;
    
    BOOL needsSkip;
    BOOL searchStarted;
    
    NSButton *spotlightSearchButton;
    NSModalSession modalSession;

}
@property (assign,readwrite) BOOL needsSkip;
@property (assign,readwrite) BOOL searchStarted;
@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet NSTableView *theTableView;
@property (assign) IBOutlet NSProgressIndicator *progressIndicator;
@property (assign) IBOutlet NSTextField *currentLabel;
@property (assign) IBOutlet NSButton *spotlightSearchButton;
@property (retain, readwrite) NSDictionary *missingsDict;
@property (retain, readwrite) NSMutableDictionary *origDict;
@property (retain, readwrite) CoGeThreadSafeMutableArray *searchScopes;
@property (assign, readwrite) NSModalSession modalSession;

-(IBAction)skipSpotlightSearch:(id)sender;
-(IBAction)searchWithSpotlight:(id)sender;
-(IBAction)doneSearch:(id)sender;

-(BOOL)checkDictionary:(NSDictionary *)dict;
-(void)spotlightSearchForFilesWithScopes:(NSArray *)thescopes;

@end
